package com.ys.entity.base;

import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TB_FileInfo", catalog="Id")
public class TbFileInfo extends BaseEntity<TbFileInfo> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="SourceType", nameJava="sourceType", typeDataBase="tinyint")
	private Integer sourceType;
	@YsField(nameDataBase="SourceId", nameJava="sourceId", typeDataBase="bigint")
	private Long sourceId;
	@YsField(nameDataBase="SourceCode", nameJava="sourceCode", typeDataBase="varchar")
	private String sourceCode;
	@YsField(nameDataBase="PreName", nameJava="preName", typeDataBase="varchar")
	private String preName;
	@YsField(nameDataBase="SufName", nameJava="sufName", typeDataBase="varchar")
	private String sufName;
	@YsField(nameDataBase="FileType", nameJava="fileType", typeDataBase="varchar")
	private String fileType;
	@YsField(nameDataBase="FileSize", nameJava="fileSize", typeDataBase="bigint")
	private Long fileSize;
	@YsField(nameDataBase="FilePath", nameJava="filePath", typeDataBase="varchar")
	private String filePath;
	@YsField(nameDataBase="CreateChangeId", nameJava="createChangeId", typeDataBase="bigint")
	private Long createChangeId;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TbFileInfo setId(Long id) {
		this.id = id;
		return this;
	}
	public Integer getSourceType() {
		return sourceType;
	}
	public TbFileInfo setSourceType(Integer sourceType) {
		this.sourceType = sourceType;
		return this;
	}
	public Long getSourceId() {
		return sourceId;
	}
	public TbFileInfo setSourceId(Long sourceId) {
		this.sourceId = sourceId;
		return this;
	}
	public String getSourceCode() {
		return sourceCode;
	}
	public TbFileInfo setSourceCode(String sourceCode) {
		this.sourceCode = sourceCode;
		return this;
	}
	public String getPreName() {
		return preName;
	}
	public TbFileInfo setPreName(String preName) {
		this.preName = preName;
		return this;
	}
	public String getSufName() {
		return sufName;
	}
	public TbFileInfo setSufName(String sufName) {
		this.sufName = sufName;
		return this;
	}
	public String getFileType() {
		return fileType;
	}
	public TbFileInfo setFileType(String fileType) {
		this.fileType = fileType;
		return this;
	}
	public Long getFileSize() {
		return fileSize;
	}
	public TbFileInfo setFileSize(Long fileSize) {
		this.fileSize = fileSize;
		return this;
	}
	public String getFilePath() {
		return filePath;
	}
	public TbFileInfo setFilePath(String filePath) {
		this.filePath = filePath;
		return this;
	}
	public Long getCreateChangeId() {
		return createChangeId;
	}
	public TbFileInfo setCreateChangeId(Long createChangeId) {
		this.createChangeId = createChangeId;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TbFileInfo setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TbFileInfo setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TbFileInfo setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TbFileInfo tbFileInfo(
		Integer sourceType,
		Long sourceId,
		String sourceCode,
		String preName,
		String sufName,
		String fileType,
		Long fileSize,
		String filePath,
		Long createChangeId,
		Integer status
			) {
		TbFileInfo entity = new TbFileInfo();
		entity.setSourceType(sourceType);
		entity.setSourceId(sourceId);
		entity.setSourceCode(sourceCode);
		entity.setPreName(preName);
		entity.setSufName(sufName);
		entity.setFileType(fileType);
		entity.setFileSize(fileSize);
		entity.setFilePath(filePath);
		entity.setCreateChangeId(createChangeId);
		entity.setStatus(status);
		return entity;
	}
}